package com.fuxian.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.fuxian.util.ReturnMapUtil;

@Controller
@Scope("prototype")
public class IndexAction extends BaseAction {
	private static final long serialVersionUID = 1L;
	private static final Log log = LogFactory.getLog(IndexAction.class);



	public String getIndexImg() {
		returnMap = new HashMap<String, Object>();
		returnMap = ReturnMapUtil.setReturnHeader(returnMap,true, "成功！");
		List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
		for (int i = 0; i < 3; i++) {
			Map<String, Object> data = new HashMap<String, Object>();
			data.put("href", "/edu/index.html");
			data.put("imgPath", "/edu/img/p1.jpg");
			data.put("desc", "热烈祝贺网站开通！");
			list.add(data);
		}
		returnMap.put("indexImg", list);
		return SUCCESS;
	}
	
	public String addIndexImg(){
		return SUCCESS;
	}
	
	public String deleteIndexImg(){
		return SUCCESS;
	}
	
	
}
